package com.example.publishDemo.Model;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;
import java.util.Date;

public class MessageInfo {
    private int m_id;
    private String type;
    private int sentId;
    private int receiveId;
    private String message;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createtime;
    private int ack;

    public MessageInfo() {

    }

    public MessageInfo(int m_id, String type, int sentId, int receiveId, String message, LocalDateTime createtime, int ack) {
        this.m_id = m_id;
        this.type = type;
        this.sentId = sentId;
        this.receiveId = receiveId;
        this.message = message;
        this.createtime = createtime;
        this.ack = ack;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getSentId() {
        return sentId;
    }

    public void setSentId(int sentId) {
        this.sentId = sentId;
    }

    public int getReceiveId() {
        return receiveId;
    }

    public void setReceiveId(int receiveId) {
        this.receiveId = receiveId;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public LocalDateTime getCreatetime() {
        return createtime;
    }

    public void setCreatetime(LocalDateTime createtime) {
        this.createtime = createtime;
    }

    public int getM_id() {
        return m_id;
    }

    public void setM_id(int m_id) {
        this.m_id = m_id;
    }

    public int isAck() {
        return ack;
    }

    public void setAck(int ack) {
        this.ack = ack;
    }
}
